package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.OGamespecruleDao;
import com.xyz.domain.table.OGamespecrule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OGamespecruleLogic {

    @Autowired
    private OGamespecruleDao oGamespecruleDao;

    public OGamespecrule add(OGamespecrule oGamespecrule){
        return oGamespecruleDao.insert(oGamespecrule);
    }

    public Integer update(OGamespecrule oGamespecrule){
        return oGamespecruleDao.update(oGamespecrule);
    }

    public List<OGamespecrule> list(OGamespecrule oGamespecrule, String orderBy){
        return oGamespecruleDao.selectList(oGamespecrule, orderBy);
    }

    public Integer delete(Integer key){
        return oGamespecruleDao.delete(key);
    }

    public PageResponseModel<OGamespecrule> pageInfo(OGamespecrule oGamespecrule, String orderBy, Integer pageNo, Integer pageSize){
        return oGamespecruleDao.selectByPageNo(oGamespecrule, orderBy, pageNo, pageSize);
    }

}